Touch detection using multiple simultaneous stimulation signals

ABSTRACT

The use of multiple stimulation signals having one or more frequencies and one or more phases to generate an image of touch on a touch sensor panel is disclosed. Each of a plurality of sense channels can be coupled to a column in a touch sensor panel and can have one or more mixers. Each mixer in the sense channel can utilize a circuit capable generating a demodulation frequency of a particular frequency. At each of multiple steps, various phases of one or more selected frequencies can be used to simultaneously stimulate the rows of the touch sensor panel, and the one or more mixers in each sense channel can be configured to demodulate the signal received from the column connected to each sense channel using the one or more selected frequencies. After all steps have been completed, the demodulated signals from the one or more mixers can be used in calculations to determine an image of touch for the touch sensor panel at each of the one or more frequencies.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation application of U.S. patentapplication Ser. No. 15/250,736, filed Aug. 29, 2016 (U.S. PatentPublication No. 2016/0364078), which is a continuation of U.S. patentapplication Ser. No. 14/791,145, filed Jul. 2, 2015 (U.S. PatentPublication No. 2015/0301681), which is a continuation application ofU.S. patent application Ser. No. 14/270,147, filed May 5, 2014 (now U.S.Pat. No. 9,092,086, issued Jul. 28, 2015), which is a continuation ofU.S. patent application Ser. No. 13/916,357, filed Jun. 12, 2013 (nowU.S. Pat. No. 8,754,867, issued Jun. 17, 2014), which is a continuationof U.S. patent application Ser. No. 11/818,345, filed Jun. 13, 2007 (nowU.S. Pat. No. 8,493,331, issued Jul. 23, 2013) all of which are herebyincorporated by reference in their entirety for all purposes.

FIELD OF THE INVENTION

This relates to touch sensor panels used as input devices for computingsystems, and more particularly, to the use of multiple digital mixers toperform spectrum analysis of noise and identify low noise stimulationfrequencies, and to the use of multiple stimulation frequencies andphases to detect and localize touch events on a touch sensor panel.

BACKGROUND OF THE INVENTION

Many types of input devices are presently available for performingoperations in a computing system, such as buttons or keys, mice,trackballs, touch sensor panels, joysticks, touch screens and the like.Touch screens, in particular, are becoming increasingly popular becauseof their ease and versatility of operation as well as their decliningprice. Touch screens can include a touch sensor panel, which can be aclear panel with a touch-sensitive surface, and a display device thatcan be positioned behind the panel so that the touch-sensitive surfacecan substantially cover the viewable area of the display device. Touchscreens can allow a user to perform various functions by touching thetouch sensor panel using a finger, stylus or other object at a locationdictated by a user interface (UI) being displayed by the display device.In general, touch screens can recognize a touch event and the positionof the touch event on the touch sensor panel, and the computing systemcan then interpret the touch event in accordance with the displayappearing at the time of the touch event, and thereafter can perform oneor more actions based on the touch event.

Touch sensor panels can be formed from a matrix of row and columntraces, with sensors or pixels present where the rows and columns crossover each other while being separated by a dielectric material. Each rowcan be driven by a stimulation signal, and touch locations can beidentified because the charge injected into the columns due to thestimulation signal is proportional to the amount of touch. However, thehigh voltage that can be required for the stimulation signal can forcethe sensor panel circuitry to be larger in size, and separated into twoor more discrete chips. In addition, touch screens formed fromcapacitance-based touch sensor panels and display devices such as liquidcrystal displays (LCDs) can suffer from noise problems because thevoltage switching required to operate an LCD can capacitively coupleonto the columns of the touch sensor panel and cause inaccuratemeasurements of touch. Furthermore, alternating current (AC) adaptersused to power or charge the system can also couple noise into thetouchscreen. Other sources of noise can include switching power suppliesin the system, backlight inverters, and light emitting diode (LED) pulsedrivers. Each of these noise sources has a unique frequency andamplitude of interference that can change with respect to time.

SUMMARY OF THE INVENTION

This relates to the use of multiple digital mixers to perform spectrumanalysis of noise and identify low noise stimulation frequencies, and tothe use of multiple stimulation frequencies and phases to detect andlocalize touch events on a touch sensor panel. Each of a plurality ofsense channels can be coupled to a column in a touch sensor panel andcan have multiple mixers. Each mixer in each sense channel can utilize acircuit capable of being controlled to generate a demodulation frequencyof a particular frequency, phase and delay.

When performing a spectrum analyzer function, no stimulation signal isapplied to any of the rows in the touch sensor panel. The sum of theoutput of all sense channels, which can represent the total charge beingapplied to the touch sensor panel including all detected noise, can befed back to each of the mixers in each sense channel. The mixers can bepaired up, and each pair of mixers can demodulate the sum of all sensechannels using the in-phase (I) and quadrature (Q) signals of aparticular frequency. The demodulated outputs of each mixer pair can beused to calculate the magnitude of the noise at that particularfrequency, wherein the lower the magnitude, the lower the noise at thatfrequency. Several low noise frequencies can be selected for use in asubsequent touch sensor panel scan function.

When performing the touch sensor panel scan function, at each ofmultiple steps, various phases of the selected low noise frequencies canbe used to simultaneously stimulate the rows of the touch sensor panel,and the multiple mixers in each sense channel can be configured todemodulate the signal received from the column connected to each sensechannel using the selected low noise frequencies. The demodulatedsignals from the multiple mixers can then be saved. After all steps havebeen completed, the saved results can be used in calculations todetermine an image of touch for the touch sensor panel at eachfrequency.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an exemplary computing system that can utilizemultiple digital mixers to perform spectrum analysis of noise andidentify low noise stimulation frequencies, and can utilize multiplestimulation frequencies and phases to detect and localize touch eventson a touch sensor panel according to one embodiment of this invention.

FIG. 2a illustrates an exemplary mutual capacitance touch sensor panelaccording to one embodiment of this invention.

FIG. 2b is a side view of an exemplary pixel in a steady-state(no-touch) condition according to one embodiment of this invention.

FIG. 2c is a side view of an exemplary pixel in a dynamic (touch)condition according to one embodiment of this invention.

FIG. 3a illustrates a portion of an exemplary sense channel or eventdetection and demodulation circuit according to one embodiment of thisinvention.

FIG. 3b illustrates a simplified block diagram of N exemplary sensechannel or event detection and demodulation circuits according to oneembodiment of this invention.

FIG. 3c illustrates an exemplary block diagram of 10 sense channels thatcan be configured either as a spectrum analyzer or as panel scan logicaccording to one embodiment of this invention.

FIG. 4a illustrates an exemplary timing diagram showing an LCD phase andtouch sensor panel phase according to one embodiment of this invention.

FIG. 4b illustrates an exemplary flow diagram describing the LCD phaseand the touch sensor panel phase according to one embodiment of thisinvention.

FIG. 4c illustrates an exemplary capacitive scanning plan according toone embodiment of this invention.

FIG. 4d illustrates exemplary calculations for a particular channel M tocompute full image results at different low noise frequencies accordingto one embodiment of this invention.

FIG. 5a illustrates an exemplary mobile telephone that can utilizemultiple digital mixers to perform spectrum analysis of noise andidentify low noise stimulation frequencies, and can utilize multiplestimulation frequencies and phases to detect and localize touch eventson a touch sensor panel according to one embodiment of this invention.

FIG. 5b illustrates an exemplary digital audio player that can utilizemultiple digital mixers to perform spectrum analysis of noise andidentify low noise stimulation frequencies, and can utilize multiplestimulation frequencies and phases to detect and localize touch eventson a touch sensor panel according to one embodiment of this invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

In the following description of preferred embodiments, reference is madeto the accompanying drawings which form a part hereof, and in which itis shown by way of illustration specific embodiments in which theinvention can be practiced. It is to be understood that otherembodiments can be used and structural changes can be made withoutdeparting from the scope of the embodiments of this invention.

This relates to the use of multiple digital mixers to perform spectrumanalysis of noise to identify low noise stimulation frequencies, and theuse of multiple stimulation frequencies and phases to detect andlocalize touch events on a touch sensor panel. Each of a plurality ofsense channels can be coupled to a column in a touch sensor panel andcan have multiple mixers. Each mixer in the sense channel can utilize acircuit capable of being controlled to generate a demodulation frequencyof a particular frequency, phase and delay.

When performing a spectrum analyzer function, no stimulation signal isapplied to any of the rows in the touch sensor panel. The sum of theoutput of all sense channels, which can represent the total charge beingapplied to the touch sensor panel including all detected noise, can befed back to each of the mixers in each sense channel. The mixers can bepaired up, and each pair of mixers can demodulate the sum of all sensechannels using the in-phase (I) and quadrature (Q) signals of aparticular frequency. The demodulated outputs of each mixer pair can beused to calculate the magnitude of the noise at that particularfrequency, wherein the lower the magnitude, the lower the noise at thatfrequency. Several low noise frequencies can be selected for use in asubsequent touch sensor panel scan function.

When performing the touch sensor panel scan function, at each ofmultiple steps, various phases of the selected low noise frequencies canbe used to simultaneously stimulate the rows of the touch sensor panel,and the multiple mixers in each sense channel can be configured todemodulate the signal received from the column connected to each sensechannel using the selected low noise frequencies. The demodulatedsignals from the multiple mixers can then be saved. After all steps havebeen completed, the saved results can be used in calculations todetermine an image of touch for the touch sensor panel at eachfrequency.

Although some embodiments of this invention may be described herein interms of mutual capacitance touch sensors, it should be understood thatembodiments of this invention are not so limited, but are generallyapplicable to other types of touch sensors such as self capacitancetouch sensors. Furthermore, although the touch sensors in the touchsensor panel may be described herein in terms of an orthogonal array oftouch sensors having rows and columns, it should be understood thatembodiments of this invention are not limited to orthogonal arrays, butcan be generally applicable to touch sensors arranged in any number ofdimensions and orientations, including diagonal, concentric circle, andthree-dimensional and random orientations. In addition, the touch sensorpanel described herein can be either a single-touch or a multi-touchsensor panel, the latter of which is described in Applicant's co-pendingU.S. application Ser. No. 10/842,862 entitled “Multipoint Touchscreen,”filed on May 6, 2004 and published as U.S. Published Application No.2006/0097991 on May 11, 2006, the contents of which are incorporated byreference herein.

FIG. 1 illustrates exemplary computing system 100 that can utilizemultiple digital mixers to perform spectrum analysis of noise andidentify low noise stimulation frequencies, and can utilize multiplestimulation frequencies and phases to detect and localize touch eventson a touch sensor panel according to embodiments of the invention.Computing system 100 can include one or more panel processors 102 andperipherals 104, and panel subsystem 106. One or more panel processors102 can include, for example, ARM968 processors or other processors withsimilar functionality and capabilities. However, in other embodiments,the panel processor functionality can be implemented instead bydedicated logic, such as a state machine. Peripherals 104 can include,but are not limited to, random access memory (RAM) or other types ofmemory or storage, watchdog timers and the like. Panel subsystem 106 caninclude, but is not limited to, one or more sense channels 108, channelscan logic 110 and driver logic 114. Channel scan logic 110 can accessRAM 112, autonomously read data from the sense channels and providecontrol for the sense channels. In addition, channel scan logic 110 cancontrol driver logic 114 to generate stimulation signals 116 at variousfrequencies and phases that can be selectively applied to rows of touchsensor panel 124. In some embodiments, panel subsystem 106, panelprocessor 102 and peripherals 104 can be integrated into a singleapplication specific integrated circuit (ASIC).

Touch sensor panel 124 can include a capacitive sensing medium having aplurality of row traces or driving lines and a plurality of columntraces or sensing lines, although other sensing media can also be used.The row and column traces can be formed from a transparent conductivemedium such as Indium Tin Oxide (ITO) or Antimony Tin Oxide (ATO),although other transparent and non-transparent materials such as coppercan also be used. In some embodiments, the row and column traces can beperpendicular to each other, although in other embodiments othernon-Cartesian orientations are possible. For example, in a polarcoordinate system, the sensing lines can be concentric circles and thedriving lines can be radially extending lines (or vice versa). It shouldbe understood, therefore, that the terms “row” and “column,” “firstdimension” and “second dimension,” or “first axis” and “second axis” asused herein are intended to encompass not only orthogonal grids, but theintersecting traces of other geometric configurations having first andsecond dimensions (e.g. the concentric and radial lines of apolar-coordinate arrangement). The rows and columns can be formed on asingle side of a substantially transparent substrate separated by asubstantially transparent dielectric material, on opposite sides of thesubstrate, or on two separate substrates separated by the dielectricmaterial.

At the “intersections” of the traces, where the traces pass above andbelow (cross) each other (but do not make direct electrical contact witheach other), the traces can essentially form two electrodes (althoughmore than two traces could intersect as well). Each intersection of rowand column traces can represent a capacitive sensing node and can beviewed as picture element (pixel) 126, which can be particularly usefulwhen touch sensor panel 124 is viewed as capturing an “image” of touch.(In other words, after panel subsystem 106 has determined whether atouch event has been detected at each touch sensor in the touch sensorpanel, the pattern of touch sensors in the multi-touch panel at which atouch event occurred can be viewed as an “image” of touch (e.g. apattern of fingers touching the panel).) The capacitance between row andcolumn electrodes appears as a stray capacitance when the given row isheld at direct current (DC) voltage levels and as a mutual signalcapacitance Csig when the given row is stimulated with an alternatingcurrent (AC) signal. The presence of a finger or other object near or onthe touch sensor panel can be detected by measuring changes to a signalcharge Qsig present at the pixels being touched, which is a function ofCsig. Each column of touch sensor panel 124 can drive sense channel 108(also referred to herein as an event detection and demodulation circuit)in panel subsystem 106.

Computing system 100 can also include host processor 128 for receivingoutputs from panel processor 102 and performing actions based on theoutputs that can include, but are not limited to, moving an object suchas a cursor or pointer, scrolling or panning, adjusting controlsettings, opening a file or document, viewing a menu, making aselection, executing instructions, operating a peripheral deviceconnected to the host device, answering a telephone call, placing atelephone call, terminating a telephone call, changing the volume oraudio settings, storing information related to telephone communicationssuch as addresses, frequently dialed numbers, received calls, missedcalls, logging onto a computer or a computer network, permittingauthorized individuals access to restricted areas of the computer orcomputer network, loading a user profile associated with a user'spreferred arrangement of the computer desktop, permitting access to webcontent, launching a particular program, encrypting or decoding amessage, and/or the like. Host processor 128 can also perform additionalfunctions that may not be related to panel processing, and can becoupled to program storage 132 and display device 130 such as an LCDdisplay for providing a UI to a user of the device.

In some systems, sensor panel 124 can be driven by high-voltage driverlogic. The high voltages that can be required by the high-voltage driverlogic (e.g. 18V) can force the high-voltage driver logic to be formedseparate from panel subsystem 106, which can operate at much lowerdigital logic voltage levels (e.g. 1.7 to 3.3V). However, in embodimentsof the invention, on-chip driver logic 114 can replace the off-chip highvoltage driver logic. Although panel subsystem 106 can have low, digitallogic level supply voltages, on-chip driver logic 114 can generate asupply voltage greater that the digital logic level supply voltages bycascoding two transistors together to form charge pump 115. Charge pump115 can be used to generate stimulation signals 116 (Vstim) that canhave amplitudes of about twice the digital logic level supply voltages(e.g. 3.4 to 6.6V). Although FIG. 1 shows charge pump 115 separate fromdriver logic 114, the charge pump can be part of the driver logic.

FIG. 2a illustrates exemplary mutual capacitance touch sensor panel 200according to embodiments of the invention. FIG. 2a indicates thepresence of a stray capacitance Cstray at each pixel 202 located at theintersection of a row 204 and a column 206 trace (although Cstray foronly one column is illustrated in FIG. 2a for purposes of simplifyingthe figure). In the example of FIG. 2a , AC stimuli Vstim 214, Vstim 215and Vstim 217 can be applied to several rows, while other rows can beconnected to DC. Vstim 214, Vstim 215 and Vstim 217 can be at differentfrequencies and phases, as will be explained later. Each stimulationsignal on a row can cause a charge Qsig=Csig×Vstim to be injected intothe columns through the mutual capacitance present at the affectedpixels. A change in the injected charge (Qsig_sense) can be detectedwhen a finger, palm or other object is present at one or more of theaffected pixels. Vstim signals 214, 215 and 217 can include one or morebursts of sine waves. Note that although FIG. 2a illustrates rows 204and columns 206 as being substantially perpendicular, they need not beso aligned, as described above. As described above, each column 206 canbe connected to a sense channel (see sense channels 108 in FIG. 1).

FIG. 2b is a side view of exemplary pixel 202 in a steady-state(no-touch) condition according to embodiments of the invention. In FIG.2b , an electric field of electric field lines 208 of the mutualcapacitance between column 206 and row 204 traces or electrodesseparated by dielectric 210 is shown.

FIG. 2c is a side view of exemplary pixel 202 in a dynamic (touch)condition. In FIG. 2c , finger 212 has been placed near pixel 202.Finger 212 is a low-impedance object at signal frequencies, and has anAC capacitance Cfinger from the column trace 204 to the body. The bodyhas a self-capacitance to ground Cbody of about 200 pF, where Cbody ismuch larger than Cfinger. If finger 212 blocks some electric field lines208 between the row and column electrodes (those fringing fields thatexit the dielectric and pass through the air above the row electrode),those electric field lines are shunted to ground through the capacitancepath inherent in the finger and the body, and as a result, the steadystate signal capacitance Csig is reduced by ΔCsig. In other words, thecombined body and finger capacitance act to reduce Csig by an amountΔCsig (which can also be referred to herein as Csig_sense), and can actas a shunt or dynamic return path to ground, blocking some of theelectric fields as resulting in a reduced net signal capacitance. Thesignal capacitance at the pixel becomes Csig−ΔCsig, where Csigrepresents the static (no touch) component and ΔCsig represents thedynamic (touch) component. Note that Csig−ΔCsig may always be nonzerodue to the inability of a finger, palm or other object to block allelectric fields, especially those electric fields that remain entirelywithin the dielectric material. In addition, it should be understoodthat as a finger is pushed harder or more completely onto themulti-touch panel, the finger can tend to flatten, blocking more andmore of the electric fields, and thus ΔCsig can be variable andrepresentative of how completely the finger is pushing down on the panel(i.e. a range from “no-touch” to “full-touch”).

FIG. 3a illustrates a portion of exemplary sense channel or eventdetection and demodulation circuit 300 according to embodiments of theinvention. One or more sense channels 300 can be present in the panelsubsystem. Each column from a touch sensor panel can be connected tosense channel 300. Each sense channel 300 can include virtual-groundamplifier 302, amplifier output circuit 309 (to be explained in greaterdetail below), signal mixer 304, and accumulator 308. Note thatamplifier output circuit 309 can also be connected to other signalmixers and associated circuitry not shown in FIG. 3a to simplify thefigure.

Virtual-ground amplifier 302, which can also be referred to as a DCamplifier or a charge amplifier, can include feedback capacitor Cfb andfeedback resistor Rfb. In some embodiments, because of the much smalleramount of charge that can be injected into a row due to lower Vstimamplitudes, Cfb can be made much smaller than in some previous designs.However, in other embodiments, because as many as all rows can besimultaneously stimulated at the same time, which tends to add charge,Cfb is not reduced in size.

FIG. 3a shows, in dashed lines, the total steady-state signalcapacitance Csig_tot that can be contributed by a touch sensor panelcolumn connected to sense channel 300 when one or more input stimuliVstim are applied to one or more rows in the touch sensor panel and nofinger, palm or other object is present. In a steady-state, no-touchcondition, the total signal charge Qsig_tot injected into the column isthe sum of all charge injected into the column by each stimulated row.In other words, Qsig_tot=Σ(Csig*Vstim for all stimulated rows). Eachsense channel coupled to a column can detect any change in the totalsignal charge due to the presence of a finger, palm or other body partor object at one or more pixels in that column. In other words,Qsig_tot_sense=Σ((Csig−Csig_sense)*Vstim for all stimulated rows).

As noted above, there can be an inherent stray capacitance Cstray ateach pixel on the touch sensor panel. In virtual ground charge amplifier302, with the +(noninverting) input tied to reference voltage Vref, the−(inverting) input can also be driven to Vref, and a DC operating pointcan be established. Therefore, regardless of how much Csig is present atthe input to virtual ground charge amplifier 302, the −input can alwaysbe driven to Vref. Because of the characteristics of virtual groundcharge amplifier 302, any charge Qstray that is stored in Cstray isconstant, because the voltage across Cstray is kept constant by thecharge amplifier. Therefore, no matter how much stray capacitance Cstrayis added to the −input, the net charge into Cstray will always be zero.The input charge is accordingly zero when the corresponding row is keptat DC and is purely a function of Csig and Vstim when the correspondingrow is stimulated. In either case, because there is no charge acrossCsig, the stray capacitance is rejected, and it essentially drops out ofany equations. Thus, even with a hand over the touch sensor panel,although Cstray can increase, the output will be unaffected by thechange in Cstray.

The gain of virtual ground amplifier 302 can be small (e.g. 0.1) and canbe computed as the ratio of Csig_tot and feedback capacitor Cfb. Theadjustable feedback capacitor Cfb can convert the charge Qsig to thevoltage Vout. The output Vout of virtual ground amplifier 302 is avoltage that can be computed as the ratio of −Csig/Cfb multiplied byVstim referenced to Vref. The Vstim signaling can therefore appear atthe output of virtual ground amplifier 302 as signals having a muchsmaller amplitude. However, when a finger is present, the amplitude ofthe output can be even further reduced, because the signal capacitanceis reduced by ΔCsig. The output of charge amplifier 302 is thesuperposition of all row stimulus signals multiplied by each of the Csigvalues on the column associated with that charge amplifier. A column canhave some pixels which are driven by a frequency at positive phase, andsimultaneously have other pixels which are driven by that same frequencyat negative phase (or 180 degrees out of phase). In this case, the totalcomponent of the charge amplifier output signal at that frequency can bethe amplitude and phase associated with the sum of the product of eachof the Csig values multiplied by each of the stimulus waveforms. Forexample, if two rows are driven at positive phase, and two rows aredriven at negative phase, and the Csig values are all equal, then thetotal output signal will be zero. If the finger gets near one of thepixels being driven at positive phase, and the associated Csig reduces,then the total output at that frequency will have negative phase.

Vstim, as applied to a row in the touch sensor panel, can be generatedas a burst of sine waves (e.g. sine waves with smoothly changingamplitudes in order to be spectrally narrow) or other non-DC signalingin an otherwise DC signal, although in some embodiments the sine wavesrepresenting Vstim can be preceded and followed by other non-DCsignaling. If Vstim is applied to a row and a signal capacitance ispresent at a column connected to sense channel 300, the output of chargeamplifier 302 associated with that particular stimulus can be sine wavetrain 310 centered at Vref with a peak-to-peak (p-p) amplitude in thesteady-state condition that can be a fraction of the p-p amplitude ofVstim, the fraction corresponding to the gain of charge amplifier 302.For example, if Vstim includes 6.6V p-p sine waves and the gain of thecharge amplifier is 0.1, then the output of the charge amplifierassociated with this row can be approximately 0.67V p-p sine wave. Inshould be noted that the signal from all rows are superimposed at theoutput of the preamp. The analog output from the preamp is converted todigital in block 309. The output from 309 can be mixed in digital signalmixer 304 (which is a digital multiplier) with demodulation waveformFstim 316.

Because Vstim can create undesirable harmonics, especially if formedfrom square waves, demodulation waveform Fstim 316 can be a Gaussiansine wave that can be digitally generated from numerically controlledoscillator (NCO) 315 and synchronized to Vstim. It should be understoodthat in addition to NCOs 315, which are used for digital demodulation,independent NCOs can be connected to digital-to-analog converters(DACs), whose outputs can be optionally inverted and used as the rowstimulus. NCO 315 can include a numerical control input to set theoutput frequency, a control input to set the delay, and a control inputto enable the NCO to generate an in-phase (I) or quadrature (Q) signal.Signal mixer 304 can demodulate the output of charge amplifier 310 bysubtracting Fstim 316 from the output to provide better noise rejection.Signal mixer 304 can reject all frequencies outside the passband, whichcan in one example be about +/−30 kHz around Fstim. This noise rejectioncan be beneficial in noisy environment with many sources of noise, suchas 802.11, Bluetooth and the like, all having some characteristicfrequency that can interfere with the sensitive (femtofarad level) sensechannel 300. For each frequency of interest being demodulated, signalmixer 304 is essentially a synchronous rectifier as the frequency of thesignal at its inputs is the same, and as a result, signal mixer output314 is essentially a rectified Gaussian sine wave.

FIG. 3b illustrates a simplified block diagram of N exemplary sensechannel or event detection and demodulation circuits 300 according toembodiments of the invention. As noted above, each charge amplifier orprogrammable gain amplifier (PGA) 302 in sense channel 300 can beconnected to amplifier output circuit 309, which in turn can beconnected to R signal mixers 304 through multiplexer 303. Amplifieroutput circuit 309 can include anti-aliasing filter 301, ADC 303, andresult register 305. Each signal mixer 304 can be demodulated with asignal from a separate NCO 315. The demodulated output of each signalmixer 304 can be connected to a separate accumulator 308 and resultsregister 307.

It should be understood that PGA 302, which may have detected a higheramount of charge generated from a high-voltage Vstim signal (e.g. 18V)in previous designs, can now detect a lower amount of charge generatedfrom a lower voltage Vstim signal (e.g. 6.6V). Furthermore, NCOs 315 cancause the output of charge amplifier 302 to be demodulatedsimultaneously yet differently, because each NCO 310 can generatesignals at different frequencies, delays and phases. Each signal mixer304 in a particular sense channel 300 can therefore generate an outputrepresentative of roughly one-Rth the charge of previous designs, butbecause there are R mixers, each demodulating at a different frequency,each sense channel can still detect about the same total amount ofcharge as in previous designs.

In FIG. 3b , signal mixers 304 and accumulators 308 can be implementeddigitally instead of in analog circuitry inside an ASIC. Having themixers and accumulators implemented digitally instead of in analogcircuitry inside the ASIC can save about 15% in die space.

FIG. 3c illustrates an exemplary block diagram of 10 sense channels 300that can be configured either as a spectrum analyzer or as panel scanlogic according to embodiments of the invention. In the example of FIG.3c , each of 10 sense channels 300 can be connected to a separate columnin a touch sensor panel. Note that each sense channel 300 can includemultiplexer or switch 303, to be explained in further detail below. Thesolid-line connections in FIG. 3c can represent the sense channelsconfigured as panel scan logic, and the dashed-line connections canrepresent the sense channels configured as a spectrum analyzer. FIG. 3cwill be discussed in greater detail hereinafter.

FIG. 4a illustrates exemplary timing diagram 400 showing LCD phase 402and the vertical blanking or touch sensor panel phase 404 according toembodiments of the invention. During LCD phase 402, the LCD can beactively switching and can be generating voltages needed to generateimages. No panel scanning is performed at this time. During touch sensorpanel phase 404, the sense channels can be configured as a spectrumanalyzer to identify low noise frequencies, and can also be configuredas panel scan logic to detect and locate an image of touch.

FIG. 4b illustrates exemplary flow diagram 406 describing LCD phase 402and touch sensor panel phase 404 corresponding to the example of FIG. 3c(the present example) according to embodiments of the invention. In Step0, the LCD can be updated as described above.

Steps 1-3 can represent a low noise frequency identification phase 406.In Step 1, the sense channels can be configured as a spectrum analyzer.The purpose of the spectrum analyzer is to identify several low noisefrequencies for subsequent use in a panel scan. With no stimulationfrequencies applied to any of the rows of the touch sensor panel, thesum of the output of all sense channels, which represent the totalcharge being applied to the touch sensor panel including all detectednoise, can be fed back to each of the mixers in each sense channel. Themixers can be paired up, and each pair of mixers can demodulate the sumof all sense channels using the in-phase (I) and quadrature (Q) signalsof a particular frequency. The demodulated outputs of each mixer paircan be used to calculate the magnitude of the noise at that particularfrequency, wherein the lower the magnitude, the lower the noise at thatfrequency.

In Step 2, the process of Step 1 can be repeated for a different set offrequencies.

In Step 3, several low noise frequencies can be selected for use in asubsequent touch sensor panel scan by identifying those frequenciesproducing the lowest calculated magnitude value.

Steps 4-19 can represent a panel scan phase 408. In Steps 4-19, thesense channels can be configured as panel scan logic. At each of Steps4-19, various phases of the selected low noise frequencies can be usedto simultaneously stimulate the rows of the touch sensor panel, and themultiple mixers in each sense channel can be configured to demodulatethe signal received from the column connected to each sense channelusing the selected low noise frequencies. The demodulated signals fromthe multiple mixers can then be saved.

In Step 20, after all steps have been completed, the saved results canbe used in calculations to determine an image of touch for the touchsensor panel at each of the selected low noise frequencies.

Referring again to the present example as shown in FIG. 3c , while sensechannels 300 are configured as a spectrum analyzer, no stimulationsignal is applied to any of the rows in the touch sensor panel. In thepresent example, there are 10 columns and therefore 10 sense channels300, and three mixers 304 for each sense channel 300, for a total of 30mixers. The outputs of all amplifier output circuits 309 in every sensechannel 300 can be summed together using summing circuit 340, and fedinto all mixers 304 through multiplexer or switch 303, which can beconfigured to select the output of summing circuit 340 instead of chargeamplifier 302.

While the sense channels are configured as a spectrum analyzer, thebackground coupling onto the columns can be measured. Because no Vstimis applied to any row, there is no Csig at any pixel, and any touches onthe panel should not affect the noise result (unless the touching fingeror other object couples noise onto ground). By adding all outputs of allamplifier output circuits 309 together in adder 340, one digitalbitstream can be obtained representing the total noise being receivedinto the touch sensor panel. The frequencies of the noise and the pixelsat which the noise is being generated are not known prior to spectrumanalysis, but do become known after spectrum analysis has beencompleted. The pixel at which the noise is being generated is not knownand is not recovered after spectrum analysis, but because the bitstreamis being used as a general noise collector, they need not be known.

While configured as a spectrum analyzer, the 30 mixers in the example ofFIG. 3c can be used in 15 pairs, each pair demodulating the I and Qsignals for 15 different frequencies as generated by NCOs 315. Thesefrequencies can be between 200 kHz and 300 kHz, for example. NCOs 315can produce a digital rampsine wave that can be used by digital mixers304 to demodulate the noise output of summing circuit 340. For example,NCO 315_0_A can generate the I component of frequency F0, while NCO315_0_B can generate the Q component of F0. Similarly, NCO 315_0_C cangenerate the I component of frequency F1, NCO 315_1_A can generate the Qcomponent of F1, NCO 315_1_B can generate the I component of frequencyF2, NCO 315_1_C can generate the Q component of F2, etc.

The output of summing circuit 340 (the noise signal) can then bedemodulated by the I and Q components of F0 through F14 using the 15pairs of mixers. The result of each mixer 304 can be accumulated inaccumulators 308. Each accumulator 308 can be a digital register that,over a sample time period, can accumulate (add together) theinstantaneous values from mixer 304. At the end of the sample timeperiod, the accumulated value represents the amount of noise signal atthat frequency and phase.

The accumulated results of an I and Q demodulation at a particularfrequency can represent the amount of content at that frequency that iseither in phase or in quadrature. These two values can then be used inmagnitude and phase calculation circuit 342 to find the absolute valueof the total magnitude (amplitude) at that frequency. A higher magnitudecan mean a higher background noise level at that frequency. Themagnitude value computed by each magnitude and phase calculation circuit342 can be saved. Note that without the Q component, noise that was outof phase with the demodulation frequency can remain be undetected.

This entire process can be repeated for 15 different frequenciesF15-F29. The saved magnitude values for each of the 30 frequencies canthen be compared, and the three frequencies with the lowest magnitudevalues (and therefore the lowest noise levels), referred to herein asfrequencies A, B and C, can be chosen. In general, the number of lownoise frequencies chosen can correspond to the number of mixers in eachsense channel.

Still referring to FIG. 3c , when sense channels 300 are configured aspanel scan logic, the dashed lines in FIG. 3c can be ignored. At each ofSteps 4-19, various phases of the selected low noise frequencies can beused to simultaneously stimulate the rows of the touch sensor panel, andthe multiple mixers in each sense channel can be configured todemodulate the signal received from the column connected to each sensechannel using the selected low noise frequencies A, B and C. In theexample of FIG. 3c , NCO_0_A can generate frequency A, NCO_0_B cangenerate frequency B, NCO_0_C can generate frequency C, NCO_1_A cangenerate frequency A, NCO_1_B can generate frequency B, NCO_1_C cangenerate frequency C, etc. The demodulated signals from each mixer 304in each sense channel can then be accumulated in accumulators 308, andsaved.

In general, the R mixer outputs for any sense channel M (where M=0 toN−1) demodulated by R low noise frequencies F₀, F₁ . . . F_(R-1) can berepresented by the notation xF₀S[chM], xF₁S[chM] . . . xF_(R-1)S[chM],where xF₀ represents the output of a mixer demodulated with frequencyF₀, xF₁ represents the output of a mixer demodulated with frequency F₁,xF_(R-1) represents the output of a mixer demodulated with frequencyF_(R-1), and S represents the sequence number in the panel scan phase.

Therefore, in Step 4 (representing sequence number 1 in the panel scanphase), and using low noise frequencies A, B and C as the demodulationfrequencies, the outputs to be saved can be referred to as xa1[ch0],xb1[ch0], xc1[ch0], xa1[ch1], xb1[ch1], xc1[ch1] . . . xa1[ch9],xb1[ch9], xc1[ch9]. Thus, in the present example, 30 results are savedin Step 4. In Step 5 (representing sequence number 2 in the panel scanphase), the 30 results to be saved can be referred to as xa2[ch0],xb2[ch0], xc2[ch0], xa2[ch1], xb2[ch1], xc2[ch1], . . . xa2[ch9],xb2[ch9], xc2[ch9]. The 30 outputs to be saved in each of Steps 6-19 canbe similarly named.

It should be understood that the additional logic outside the sensechannels in FIG. 3c can be implemented in the channel scan logic 110 ofFIG. 1, although it could also be located elsewhere.

FIG. 4c illustrates an exemplary capacitive scanning plan 410corresponding to the present example according to embodiments of theinvention. FIG. 4c describes Steps 0-19 as shown in FIG. 4b for anexemplary sensor panel having 15 rows R0-R14.

Step 0 can represent the LCD phase at which time the LCD can be updated.The LCD phase can take about 12 ms, during which time no row can bestimulated.

Steps 1-19 can represent the vertical blanking interval for the LCD,during which time the LCD is not changing voltages.

Steps 1-3 can represent the low noise frequency identification phasewhich can take about 0.6 ms, again during which time no row can bestimulated. In Step 1, the I and Q components of different frequenciesranging from 200 kHz to 300 kHz (separated by at least 10 kHz) can besimultaneously applied to pairs of mixers in the sense channelsconfigured as a spectrum analyzer, and a magnitude of the noise at thosefrequencies can be saved. In Step 2, the I and Q components of differentfrequencies ranging from 300 kHz to 400 kHz can be simultaneouslyapplied to pairs of mixers in the sense channels configured as aspectrum analyzer, and a magnitude of the noise at those frequencies canbe saved. In Step 3, the lowest noise frequencies A, B and C can beidentified by locating the frequencies that produced the lowest savedmagnitudes. The identification of the lowest noise frequencies can bedone solely on the measured spectra measured in steps 1 and 2, or it canalso take into account historical measurements from steps 1 and 2 ofprevious frames.

Steps 4-19 can represent the panel scan phase which can take about 3.4ms.

In Step 4, which can take about 0.2 ms, positive and negative phases ofA, B and C can be applied to some rows, while other rows can be leftunstimulated. It should be understood that +A can represent scanfrequency A with a positive phase, −A can represent scan frequency Awith a negative phase, +B can represent scan frequency B with a positivephase, −B can represent scan frequency B with a negative phase, +C canrepresent scan frequency C with a positive phase, and −C can representscan frequency C with a negative phase. The charge amplifiers in thesense channels coupled to the columns of the sensor panel can detect thetotal charge coupled onto the column due to the rows being stimulated.The output of each charge amplifier can be demodulated by the threemixers in the sense channel, each mixer receiving either demodulationfrequency A, B or C. Results or values xa1, xb1 and xc1 can be obtainedand saved, where xa1, xb1 and xc1 are vectors. For example, xa1 can be avector with 10 values xa1 [ch0], xa1 [ch1], xa1 [ch2] . . . xa1[ch9],xb1 can be a vector with 10 values xb1[ch0], xb1[ch1], xb1[ch2] . . .xb1[ch9], and xc1 can be a vector with 10 values xc1 [ch0], xc1[ch1],xc1 [ch2] . . . xc1 [ch9].

In particular, in Step 4, +A is applied to rows 0, 4, 8 and 12, +B, −B,+B and −B are applied to rows 1, 5, 9 and 13, respectively, +C, −C, +Cand −C are applied to rows 2, 6, 10 and 14, respectively, and nostimulation is applied to rows 3, 7, 11 and 15. The sense channelconnected to column 0 senses the charge being injected into column 0from all stimulated rows, at the noted frequencies and phases. The threemixers in the sense channel can now be set to demodulate A, B and C, andthree different vector results xa1, xb1 and xc1 can be obtained for thesense channel. Vector xa1, for example, can represent the sum of thecharge injected into columns 0-9 at the four rows being stimulated by +A(e.g. rows 0, 4, 8 and 12). Vector xa1 does not provide completeinformation, however, as the particular row at which a touch occurred isstill unknown. In parallel, in the same Step 4, rows 1 and 5 can bestimulated with +B, and rows 9 and 13 can be stimulated with −B, andvector xb1 can represent the sum of the charge injected into columns 0-9at the rows being stimulated by +B and −B (e.g. rows 1, 5, 9 and 13). Inparallel, in the same Step 4, rows 2 and 14 can be stimulated with +C,and rows 6 and 10 can be stimulated with −C, and vector xc1 canrepresent the sum of the charge injected into columns 0-9 at the rowsbeing stimulated by +C and −C (e.g. rows 2, 6, 10 and 14). Thus, at theconclusion of Step 4, three vectors containing 10 results each, for atotal of 30 results, are obtained and stored.

Steps 5-19 are similar to Step 4, except that different phases of A, Band C can be applied to different rows, and different vector results areobtained at each step. At the conclusion of Step 19, a total of 480results will have been obtained in the example of FIG. 4c . By obtainingthe 480 results at each of Steps 4-19, a combinatorial, factorialapproach is used wherein incrementally, for each pixel, information isobtained regarding the image of touch for each of the three frequenciesA, B and C.

It should be noted that Steps 4-19 illustrate a combination of twofeatures, multi-phase scanning and multi-frequency scanning. Eachfeature can have its own benefit. Multi-frequency scanning can save timeby a factor of three, while multi-phase scanning can provide a bettersignal-to-noise ratio (SNR) by about a factor of two.

Multi-phase scanning can be employed by simultaneously stimulating mostor all of the rows using different phases of multiple frequencies.Multi-phase scanning is described in Applicant's co-pending U.S.application Ser. No. 11/619,433 entitled “Simultaneous SensingArrangement,” filed on Jan. 3, 2007, the contents of which areincorporated by reference herein. One benefit of multi-phase scanning isthat more information can be obtained from a single panel scan.Multi-phase scanning can achieve a more accurate result because itminimizes the possibility of inaccuracies that can be produced due tocertain alignments of the phases of the stimulation frequency and noise.

In addition, multi-frequency scanning can be employed by simultaneouslystimulating most or all of the rows using multiple frequencies. As notedabove, multi-frequency scanning saves time. For example, in someprevious methods, 15 rows can be scanned in 15 steps at frequency A,then the 15 rows can be scanned in 15 steps at frequency B, then the 15rows can be scanned in 15 steps at frequency C, for a total of 45 steps.However, using multi-frequency scanning as shown in the example of FIG.4c , only a total of 16 steps (Steps 4 through Step 19) can be required.Multi-frequency in its simplest embodiment can include simultaneouslyscanning R0 at frequency A, R1 at frequency B, and R2 at frequency C ina first step, then simultaneously scanning R1 at frequency A, R2 atfrequency B, and R3 at frequency C in step 2, etc. for a total of 15steps.

At the conclusion of Steps 4-19, when the 480 results described abovehave been obtained and stored, additional calculations can be performedutilizing these 480 results.

FIG. 4d illustrates exemplary calculations for a particular channel M tocompute full image results at different low noise frequenciescorresponding to the present example according to embodiments of theinvention. In the present example, for each channel M, where M=0 to 9,the 45 computations shown in FIG. 4d can be performed to obtain a rowresult for each row and each frequency A, B and C. Each set of 45computations for each channel can generate a resultant pixel value forthe column of pixels associated with that channel. For example, the Row0, frequency A computation (xa1[chM]+xa2[chM]+xa3[chM]+xa4[chM])/4 cangenerate the row 0, channel M result for frequency A. In the presentexample, after all computations have been performed and stored for everychannel, a total of 450 results will have been obtained. Thesecomputations correspond to Step 20 of FIG. 4 b.

Of these 450 results, there will be 150 for frequency A, 150 forfrequency B, and 150 for frequency C. The 150 results for a particularfrequency represent an image map or image of touch at that frequencybecause a unique value is provided for each column (i.e. channel) androw intersection. These touch images can then be processed by softwarethat synthesizes the three images and looks at their characteristics todetermine which frequencies are inherently noisy and which frequenciesare inherently clean. Further processing can then be performed. Forexample, if all three frequencies A, B and C are all relativelynoise-free, the results can be averaged together.

It should be understood that the computations shown in FIGS. 4c and 4dcan be performed under control of panel processor 102 or host processor128 of FIG. 1, although they could also be performed elsewhere.

FIG. 5a illustrates an exemplary mobile telephone 536 that can includetouch sensor panel 524, display device 530 bonded to the sensor panelusing pressure sensitive adhesive (PSA) 534, and other computing systemblocks in computing system 100 of FIG. 1 for applying multiplestimulation frequencies and phases to the touch sensor panel to identifylow noise stimulation frequencies and detect and localize touch eventsaccording to embodiments of the invention.

FIG. 5b illustrates an exemplary digital audio/video player 540 that caninclude touch sensor panel 524, display device 530 bonded to the sensorpanel using pressure sensitive adhesive (PSA) 534, and other computingsystem blocks in computing system 100 of FIG. 1 for applying multiplestimulation frequencies and phases to the touch sensor panel to identifylow noise stimulation frequencies and detect and localize touch eventsaccording to embodiments of the invention.

Although embodiments of this invention have been fully described withreference to the accompanying drawings, it is to be noted that variouschanges and modifications will become apparent to those skilled in theart. Such changes and modifications are to be understood as beingincluded within the scope of embodiments of this invention as defined bythe appended claims.

What is claimed is:
 1. An apparatus for controlling a touch panel,wherein the touch panel comprises a plurality of drive and a pluralityof sense lines, the apparatus comprising: controller circuitrycomprising drive circuitry and sense circuitry, wherein: the drivecircuitry is configured to: in a panel scan mode, simultaneously apply aplurality of stimulation signals to the plurality of drive lines, theplurality of stimulation signals having a stimulation frequency andmultiple stimulation phases; and in a spectrum analyzer mode, not applythe plurality of stimulation signals to the plurality of drive lines;and the sense circuitry is configured to: in the panel scan mode,determine first demodulated sense signals based on one or moredemodulation signals and sensed signals received from the plurality ofsense lines, the one or more demodulation signals having a demodulationfrequency and multiple demodulation phases based on the stimulationfrequency and the multiple stimulation phases; and in the spectrumanalyzer mode, determine second demodulated sense signals based on aplurality of demodulation signals and sense signals received from theplurality of sense lines; and the controller circuitry is configured todetermine the stimulation frequency to be used in the panel scan modeduring a subsequent frame, wherein the stimulation frequency to be usedin the panel scan mode during the subsequent frame is determined basedon the second demodulated sense signals determined in the spectrumanalyzer mode.
 2. The apparatus of claim 1, wherein the sense circuitrycomprises sense channels, wherein each of the sense channels is coupledto one of the plurality of sense lines and wherein each of the sensechannels comprises a charge amplifier and one or more signal mixers. 3.The apparatus of claim 2, wherein determining the first demodulatedsense signals comprises, for each of the sense channels, mixing anoutput of the charge amplifier with one of the one or more demodulationsignals having the demodulation frequency at at least one of the one ormore mixers.
 4. The apparatus of claim 2, wherein determining the seconddemodulated sense signals comprises mixing a noise signal formed bysumming an output of the charge amplifier from a plurality of the sensechannels at the one or more mixers of one or more sense channels withthe plurality of demodulation signals.
 5. The apparatus of claim 4,wherein a first sense channel of the sense channels mixes, at one of theone or more mixers of the first sense channel, the noise signal with anin-phase demodulation signal at a first of the one or more demodulationfrequencies, and wherein a second sense channel of the sense channelsmixes, at one of the one or mixers of the second sense channel, thenoise signal with a quadrature demodulation signal at the first of theone or more demodulation frequencies.
 6. The apparatus of claim 4,wherein a first sense channel of the sense channels mixes the noisesignal with first in-phase and quadrature demodulation signals at afirst of the one or more demodulation frequencies, and wherein a secondsense channel of the sense channels mixes the noise signal with secondin-phase and quadrature demodulation signals at a second of the one ormore demodulation frequencies.
 7. The apparatus of claim 2, wherein eachof the sense channels comprises one or more frequency generator circuitsconfigured to generate the plurality of demodulation signals in thespectrum analyzer mode.
 8. The apparatus of claim 7, wherein the one ormore of the frequency generator circuits comprises a numericallycontrolled oscillator (NCO).
 9. A method for controlling a touch panelcomprising a plurality of drive and a plurality of sense lines, themethod comprising: in a panel scan mode: simultaneously applying aplurality of stimulation signals to a plurality of drive lines, theplurality of stimulation signals having a stimulation frequency andmultiple stimulation phases; and determining first demodulated sensesignals based on one or more demodulation signals and sensed signalsreceived from the plurality of sense lines, the one or more demodulationsignals having a demodulation frequency and multiple demodulation phasesbased on the stimulation frequency and the multiple stimulation phases;in a spectrum analyzer mode: not applying the plurality of stimulationsignals to the plurality of drive lines; and determining seconddemodulated sense signals based on a plurality of demodulation signalsand sensed signals received from the plurality of sense lines; anddetermining the stimulation frequency to be used in the panel scan modeduring a subsequent frame, wherein the stimulation frequency to be usedin the panel scan mode during the subsequent frame is determined basedon the second demodulated sense signals determined in the spectrumanalyzer mode.
 10. The method of claim 9, wherein the sense signals arereceived at sense channels, wherein each sense channel of the sensechannels is coupled to receive a sense signal of the sense signals froma sense line, and wherein each of the sense channels comprises a chargeamplifier and one or more signal mixers.
 11. The method of claim 10,wherein determining the first demodulated sense signals comprises, foreach of the sense channels, mixing an output of the charge amplifierwith one of the one or more demodulation signals having the demodulationfrequency at at least one of the one or more mixers.
 12. The method ofclaim 10, wherein determining the second demodulated sense signalscomprises mixing a noise signal formed by summing an output of thecharge amplifier from a plurality of the sense channels at the one ormore mixers of one or more sense channels with the plurality ofdemodulation signals.
 13. The method of claim 12, wherein determiningthe second demodulated sense signals comprises mixing, at one of the oneor more mixers of a first of the sense channels, the noise signal withan in-phase demodulation signal at a first of the one or moredemodulation frequencies, and mixing, at one of the one or mixers of asecond of the sense channels, the noise signal with a quadraturedemodulation signal at the first of the one or more demodulationfrequencies.
 14. The method of claim 12, wherein determining the seconddemodulated sense signals comprises mixing, at a first of the sensechannels, the noise signal with first in-phase and quadraturedemodulation signals at a first of the one or more demodulationfrequencies, and mixing, at a second of the sense channels, the noisesignal with second in-phase and quadrature demodulation signals at asecond of the one or more demodulation frequencies.
 15. A device forcontrolling a touch panel, wherein the touch panel comprises a pluralityof drive and a plurality of sense lines, the device comprising:controller circuitry, comprising drive circuitry and sense circuitry,configured to operate in a panel scan mode and a spectrum analyzer mode,wherein: while operating in the panel scan mode in a first frame: thedrive circuitry is configured to simultaneously apply a first pluralityof stimulation signals to the plurality of drive lines, the firstplurality of stimulation signals having a first stimulation frequencyand multiple stimulation phases; and the sense circuitry is configuredto determine a first plurality of demodulated sense signals based on afirst plurality of sense signals received from the plurality of senselines received from the plurality of sense lines and based on one ormore first demodulation signals, the one or more first demodulationsignals having a first demodulation frequency and multiple demodulationphases based on the first stimulation frequency and the multiplestimulation phases; and while operating in the spectrum analyzer mode,subsequent to operating in the panel scan mode in the first frame: thedrive circuitry is configured to not apply the plurality of stimulationsignals to the plurality of drive lines; and the sense circuitry isconfigured to determine a second plurality of demodulated sense signalsbased on a second plurality of sense signals received from the pluralityof sense lines and based on a second plurality of demodulation signals;and while operating in the panel scan mode in a second frame: the drivecircuitry is configured to simultaneously apply a second plurality ofstimulation signals to the plurality of drive lines, the secondplurality of stimulation signals having the second stimulation frequencyand multiple stimulation phases, wherein the second stimulationfrequency is based on the second plurality of demodulated sense signals.16. The device of claim 15, wherein the first stimulation frequency isselected from one or more first low-noise frequencies and the secondstimulation frequency is selected from one or more second low-noisefrequencies.
 17. The device of claim 16, wherein determining the secondplurality of demodulated sense signals comprises: mixing a noise signalbased on the second plurality of sense signals received from theplurality of the sense lines with the second plurality of demodulationsignals; accumulating in-phase and quadrature components of the mixednoise signal for each of the second plurality of demodulation signals;calculating a magnitude of the accumulated in-phase and quadraturecomponents for each of the second plurality of demodulation signals; anddetermining the one or more second low-noise frequencies by selectingone or more frequencies of the second plurality of demodulation signalswith smallest magnitude.
 18. The device of claim 15, where thecontroller circuitry comprising the drive circuitry and the sensecircuitry is implemented in an integrated circuit.
 19. The device ofclaim 15, wherein the sense circuitry comprises a plurality of sensechannels, a plurality of demodulator circuits, and a plurality ofaccumulator circuits.
 20. A non-transitory computer readable storagemedium storing instructions, that when executed by a processor, performsa method for controlling a touch panel comprising a plurality of driveand a plurality of sense lines, the method comprising: in a panel scanmode: simultaneously applying a plurality of stimulation signals to aplurality of drive lines, the plurality of stimulation signals having astimulation frequency and multiple stimulation phases; and determiningfirst demodulated sense signals based on one or more demodulationsignals and sensed signals received from the plurality of sense lines,the one or more demodulation signals having a demodulation frequency andmultiple demodulation phases based on the stimulation frequency and themultiple stimulation phases; in a spectrum analyzer mode: not applyingthe plurality of stimulation signals to the plurality of drive lines;and determining second demodulated sense signals based on a plurality ofdemodulation signals and sensed signals received from the plurality ofsense lines; and determining the stimulation frequency to be used in thepanel scan mode during a subsequent frame, wherein the stimulationfrequency to be used in the panel scan mode during the subsequent frameis determined based on the second demodulated sense signals determinedin the spectrum analyzer mode.
 21. The non-transitory computer readablestorage medium of claim 20, wherein the sense signals are received atsense channels, wherein each sense channel of the sense channels iscoupled to receive a sense signal of the sense signals from a senseline, and wherein each of the sense channels comprises a chargeamplifier and one or more signal mixers.
 22. The non-transitory computerreadable storage medium of claim 21, wherein determining the firstdemodulated sense signals comprises, for each of the sense channels,mixing an output of the charge amplifier with one of the one or moredemodulation signals having the demodulation frequency at at least oneof the one or more mixers.
 23. The non-transitory computer readablestorage medium of claim 21, wherein determining the second demodulatedsense signals comprises mixing a noise signal formed by summing anoutput of the charge amplifier from a plurality of the sense channels atthe one or more mixers of one or more sense channels with the pluralityof demodulation signals.
 24. The non-transitory computer readablestorage medium of claim 23, wherein determining the second demodulatedsense signals comprises mixing, at one of the one or more mixers of afirst of the sense channels, the noise signal with an in-phasedemodulation signal at a first of the one or more demodulationfrequencies, and mixing, at one of the one or mixers of a second of thesense channels, the noise signal with a quadrature demodulation signalat the first of the one or more demodulation frequencies.
 25. Thenon-transitory computer readable storage medium of claim 23, whereindetermining the second demodulated sense signals comprises mixing, at afirst of the sense channels, the noise signal with first in-phase andquadrature demodulation signals at a first of the one or moredemodulation frequencies, and mixing, at a second of the sense channels,the noise signal with second in-phase and quadrature demodulationsignals at a second of the one or more demodulation frequencies.